prolog './g122.ijs'
NB. -:y -----------------------------------------------------------------

randuni''

(-: -: 0.5&*)  ?2 3 4$2
(-: -: 0.5&*)  _20+?50$50
(-: -: 0.5&*)  o. _20+?50$50
(-: -: 0.5&*)  r. ?3 4 5$100
(-: -: 0.5&*)  i.0 3 4
(-: -: 0.5&*)  i.3 0

'domain error' -: -: etx 'abc'
'domain error' -: -: etx u:'abc'
'domain error' -: -: etx 10&u:'abc'
'domain error' -: -: etx s:@<"0 'abc'
'domain error' -: -: etx 3;4 5


NB. x-:y ----------------------------------------------------------------

''   -: $0
''   -: 0$a:
(u:'')   -: $0
(u:'')   -: 0$a:
(10&u:'')   -: $0
(10&u:'')   -: 0$a:
(s:'')   -: $0
(s:'')   -: 0$a:
($0) -: 0$a:

(0 3 4 5$1)   -: 0 3 4 5$4
(0 3 4 5$1)   -: 0 3 4 5$4.6
(0 3 4 5$1)   -: 0 3 4 5$4j6
(0 3 4 5$1)   -: 0 3 4 5$'a'
(0 3 4 5$1)   -: 0 3 4 5$'a'
(0 3 4 5$1)   -: 0 3 4 5$<u:'a'
(0 3 4 5$1)   -: 0 3 4 5$<u:'a'
(0 3 4 5$1)   -: 0 3 4 5$<10&u:'a'
(0 3 4 5$1)   -: 0 3 4 5$<10&u:'a'
(0 3 4 5$1)   -: 0 3 4 5$s:@<"0 'a'
(0 3 4 5$1)   -: 0 3 4 5$s:@<"0 'a'

(0 3 4 5$456) -: 0 3 4 5$0
(0 3 4 5$456) -: 0 3 4 5$4.6
(0 3 4 5$456) -: 0 3 4 5$4j6
(0 3 4 5$456) -: 0 3 4 5$'a'
(0 3 4 5$456) -: 0 3 4 5$<'a'
(0 3 4 5$456) -: 0 3 4 5$u:'a'
(0 3 4 5$456) -: 0 3 4 5$<u:'a'
(0 3 4 5$456) -: 0 3 4 5$10&u:'a'
(0 3 4 5$456) -: 0 3 4 5$<10&u:'a'
(0 3 4 5$456) -: 0 3 4 5$s:@<"0 'a'
(0 3 4 5$456) -: 0 3 4 5$s:@<"0&.> <'a'
(0 3 4 5$456) -: 0 3 4 5$<"0@s: <'a'

(0 3 4 5$4.6) -: 0 3 4 5$0
(0 3 4 5$4.6) -: 0 3 4 5$456
(0 3 4 5$4.6) -: 0 3 4 5$4j6
(0 3 4 5$4.6) -: 0 3 4 5$'a'
(0 3 4 5$4.6) -: 0 3 4 5$<'a'
(0 3 4 5$4.6) -: 0 3 4 5$u:'a'
(0 3 4 5$4.6) -: 0 3 4 5$<u:'a'
(0 3 4 5$4.6) -: 0 3 4 5$10&u:'a'
(0 3 4 5$4.6) -: 0 3 4 5$<10&u:'a'
(0 3 4 5$4.6) -: 0 3 4 5$s:@<"0 'a'
(0 3 4 5$4.6) -: 0 3 4 5$s:@<"0&.> <'a'
(0 3 4 5$4.6) -: 0 3 4 5$<"0@s: <'a'

(0 3 4 5$4j6) -: 0 3 4 5$0
(0 3 4 5$4j6) -: 0 3 4 5$456
(0 3 4 5$4j6) -: 0 3 4 5$4.6
(0 3 4 5$4j6) -: 0 3 4 5$'a'
(0 3 4 5$4j6) -: 0 3 4 5$<'a'
(0 3 4 5$4j6) -: 0 3 4 5$u:'a'
(0 3 4 5$4j6) -: 0 3 4 5$<u:'a'
(0 3 4 5$4j6) -: 0 3 4 5$10&u:'a'
(0 3 4 5$4j6) -: 0 3 4 5$<10&u:'a'
(0 3 4 5$4j6) -: 0 3 4 5$s:@<"0 'a'
(0 3 4 5$4j6) -: 0 3 4 5$s:@<"0&.> <'a'
(0 3 4 5$4j6) -: 0 3 4 5$<"0@s: <'a'

(0 3 4 5$'j') -: 0 3 4 5$0
(0 3 4 5$'j') -: 0 3 4 5$456
(0 3 4 5$'j') -: 0 3 4 5$4.6
(0 3 4 5$'j') -: 0 3 4 5$4j6
(0 3 4 5$'j') -: 0 3 4 5$<'a'

(0 3 4 5$u:'j') -: 0 3 4 5$0
(0 3 4 5$u:'j') -: 0 3 4 5$456
(0 3 4 5$u:'j') -: 0 3 4 5$4.6
(0 3 4 5$u:'j') -: 0 3 4 5$4j6
(0 3 4 5$u:'j') -: 0 3 4 5$<'a'

(0 3 4 5$10&u:'j') -: 0 3 4 5$0
(0 3 4 5$10&u:'j') -: 0 3 4 5$456
(0 3 4 5$10&u:'j') -: 0 3 4 5$4.6
(0 3 4 5$10&u:'j') -: 0 3 4 5$4j6
(0 3 4 5$10&u:'j') -: 0 3 4 5$<'a'

(0 3 4 5$s:@<"0 'j') -: 0 3 4 5$0
(0 3 4 5$s:@<"0 'j') -: 0 3 4 5$456
(0 3 4 5$s:@<"0 'j') -: 0 3 4 5$4.6
(0 3 4 5$s:@<"0 'j') -: 0 3 4 5$4j6
(0 3 4 5$s:@<"0 'j') -: 0 3 4 5$s:@<"0&.> <'a'
(0 3 4 5$s:@<"0 'j') -: 0 3 4 5$<"0@s: <'a'

(0 3 4 5$u:'j') -: 0 3 4 5$0
(0 3 4 5$<56) -: 0 3 4 5$0
(0 3 4 5$<56) -: 0 3 4 5$456
(0 3 4 5$<56) -: 0 3 4 5$4.6
(0 3 4 5$<56) -: 0 3 4 5$4j6
(0 3 4 5$<56) -: 0 3 4 5$'a'
(0 3 4 5$<56) -: 0 3 4 5$u:'a'
(0 3 4 5$<56) -: 0 3 4 5$10&u:'a'
(0 3 4 5$<56) -: 0 3 4 5$s:@<"0 'a'

match =: 0:`(*./@:=&,)@.(-:&$)
match0 =: 0:`(*./@:(=!.0)&,)@.(-:&$)
test  =: -: = match
test0 =: -:!.0 = match0

NB. Boolean
0 test 0
1 test 1
a test a=:?1000$2
(?2 3$2) test ?2 3 4 5$2
((}:a),-.{:a) test a=:?100$2
(}.a,5)   test a=:?100$2
(}.a,5)   test~a=:?100$2
(}.a,4.5) test a=:?100$2
(}.a,4.5) test~a=:?100$2
(}.a,4j5) test a=:?100$2
(}.a,4j5) test~a=:?100$2
(}:a,5)   test a=:?100$2
(}:a,5)   test~a=:?100$2
(}:a,4.5) test a=:?100$2
(}:a,4.5) test~a=:?100$2
(}:a,4j5) test a=:?100$2
(}:a,4j5) test~a=:?100$2

NB. literal
'a' test 'b'
a test a=:a.{~?100$256
((}:a),{:a.) test a=:a.{~?100$255
(a.{~?2 3$256) test a.{~?2 3 4 5$256
(($a)$1)        test a=:a.{~?2 3 4$255
(($a)$45)       test a=:a.{~?2 3 4$255
(($a)$4.5)      test a=:a.{~?2 3 4$255
(($a)$4j5)      test a=:a.{~?2 3 4$255
(($a)$<45)      test a=:a.{~?2 3 4$255
f =: $&'abc'            test $&'abc'
g =: ,&'d'@}:@($&'abc') test ,&'e'@}:@($&'abc')
h =: {&'ab'@:?@($&2)    test {&'ab'@:?@($&2)
f"0 i.25
g"0 i.25
h"0 i.25

NB. Test all boundaries of length and mismatch point
4 : 0 "0/~ i. 300
r =. y {. }. a.  NB. y is length
if. x < y do. l =. (0{a.) x} r else. l =. y {. }. a. end.  NB. x is mismatch point
l test r
)

NB. literal2
(u:'a') test u:'b'
a test a=:adot1{~?100$(#adot1)
((}:a),{:adot1) test a=:adot1{~?100$(<:#adot1)
(adot1{~?2 3$(#adot1)) test adot1{~?2 3 4 5$(#adot1)
(($a)$1)        test a=:adot1{~?2 3 4$(<:#adot1)
(($a)$45)       test a=:adot1{~?2 3 4$(<:#adot1)
(($a)$4.5)      test a=:adot1{~?2 3 4$(<:#adot1)
(($a)$4j5)      test a=:adot1{~?2 3 4$(<:#adot1)
(($a)$<45)      test a=:adot1{~?2 3 4$(<:#adot1)
f =: $&(u:'abc')            test $&(u:'abc')
g =: ,&(u:'d')@}:@($&'abc') test ,&(u:'e')@}:@($&(u:'abc'))
h =: {&(u:'ab')@:?@($&2)    test {&(u:'ab')@:?@($&2)
f"0 i.25
g"0 i.25
h"0 i.25

NB. literal4
(10&u:'a') test 10&u:'b'
a test a=:adot2{~?100$(#adot2)
((}:a),{:adot2) test a=:adot2{~?100$(<:#adot2)
(adot2{~?2 3$(#adot2)) test adot2{~?2 3 4 5$(#adot2)
(($a)$1)        test a=:adot2{~?2 3 4$(<:#adot2)
(($a)$45)       test a=:adot2{~?2 3 4$(<:#adot2)
(($a)$4.5)      test a=:adot2{~?2 3 4$(<:#adot2)
(($a)$4j5)      test a=:adot2{~?2 3 4$(<:#adot2)
(($a)$<45)      test a=:adot2{~?2 3 4$(<:#adot2)
f =: $&(10&u:'abc')            test $&(10&u:'abc')
g =: ,&(10&u:'d')@}:@($&'abc') test ,&(10&u:'e')@}:@($&(10&u:'abc'))
h =: {&(10&u:'ab')@:?@($&2)    test {&(10&u:'ab')@:?@($&2)
f"0 i.25
g"0 i.25
h"0 i.25

NB. symbol
(s:@<"0 'a') test s:@<"0 'b'
a test a=:sdot0{~?100$(#sdot0)
((}:a),{:sdot0) test a=:sdot0{~?100$(<:#sdot0)
(sdot0{~?2 3$(#sdot0)) test sdot0{~?2 3 4 5$(#sdot0)
(($a)$1)        test a=:sdot0{~?2 3 4$(<:#sdot0)
(($a)$45)       test a=:sdot0{~?2 3 4$(<:#sdot0)
(($a)$4.5)      test a=:sdot0{~?2 3 4$(<:#sdot0)
(($a)$4j5)      test a=:sdot0{~?2 3 4$(<:#sdot0)
(($a)$<45)      test a=:sdot0{~?2 3 4$(<:#sdot0)
f =: $&(s:@<"0 'abc')            test $&(s:@<"0 'abc')
g =: ,&(s:@<"0 'd')@}:@($&(s:@<"0 'abc')) test ,&(s:@<"0 'e')@}:@($&(s:@<"0 'abc'))
h =: {&(s:@<"0 'ab')@:?@($&2)    test {&(s:@<"0 'ab')@:?@($&2)
f"0 i.25
g"0 i.25
h"0 i.25

NB. integer
3 test 3
3 test _3
a test a=:_1e9+?1000$2e9
(?2 3$234) test ?2 3 4 5$234
((}:a),2e9) test a=:?100$2e9
(}.a,4.5) test a=:_1e9+?100$2e9
(}.a,4.5) test~a=:_1e9+?100$2e9
(}.a,4j5) test a=:_1e9+?100$2e9
(}.a,4j5) test~a=:_1e9+?100$2e9
(}:a,4.5) test a=:_1e9+?100$2e9
(}:a,4.5) test~a=:_1e9+?100$2e9
(}:a,4j5) test a=:_1e9+?100$2e9
(}:a,4j5) test~a=:_1e9+?100$2e9

NB. real
3.5 test 3.5
3.5 test _3.5
a test a=:o._1e9+?100$2e9
(o.?2 3$234) test o.?2 3 4 5$234
((}:a),2e9)  test o.a=:?100$2e8
(}.a,4j5) test a=:o._1e9+?100$2e9
(}.a,4j5) test~a=:o._1e9+?100$2e9
(}:a,4j5) test a=:o._1e9+?100$2e9
(}:a,4j5) test~a=:o._1e9+?100$2e9
3.5 test0 3.5
3.5 test0 _3.5
a test0 a=:o._1e9+?100$2e9
(o.?2 3$234) test0 o.?2 3 4 5$234
((}:a),2e9)  test0 o.a=:?100$2e8
(}.a,4j5) test0 a=:o._1e9+?100$2e9
(}.a,4j5) test0~a=:o._1e9+?100$2e9
(}:a,4j5) test0 a=:o._1e9+?100$2e9
(}:a,4j5) test0~a=:o._1e9+?100$2e9

NB. complex
3j5 test 3j5
3j5 test 3j_5
a test a=:j./_1e9+?2 50$2e9
(j./?2 3$234) test j./?2 3 4 5$234
((}:a),2e9) test a=:j./?2 50$2e8

NB. boxed
(<'asdf') test <'asdf'
(<'asdf') test <'foob'
(<u:'asdf') test <u:'asdf'
(<u:'asdf') test <u:'foob'
(<10&u:'asdf') test <10&u:'asdf'
(<10&u:'asdf') test <10&u:'foob'
a test a=:<"1 ?300 3$1e9
((}:a),<9) test a=:<"1 ?300 3$1e9

a (-:!.0 = *./@:(=!.0)&,) a=:o._1e9+?100$2e9
(}:a,4j5)   (-:!.0 = *./@:(=!.0)&,) a=:o._1e9+?100$2e9
(}:a,4j5)   (-:!.0 = *./@:(=!.0)&,)~a=:o._1e9+?100$2e9
((}.a),4j5) (-:!.0 = *./@:(=!.0)&,) a=:o._1e9+?100$2e9
((}.a),4j5) (-:!.0 = *./@:(=!.0)&,)~a=:o._1e9+?100$2e9
((}:a),4j5) (-:!.0 = *./@:(=!.0)&,) a=:o._1e9+?100$2e9
((}:a),4j5) (-:!.0 = *./@:(=!.0)&,)~a=:o._1e9+?100$2e9

a (-:!.0 = *./@:(=!.0)&,) a=:j./_1e9+?2 50$2e9
((}.a),4j5) (-:!.0 = *./@:(=!.0)&,) a=:j./_1e9+?2 50$2e9
((}.a),4j5) (-:!.0 = *./@:(=!.0)&,)~a=:j./_1e9+?2 50$2e9
((}:a),4j5) (-:!.0 = *./@:(=!.0)&,) a=:j./_1e9+?2 50$2e9
((}:a),4j5) (-:!.0 = *./@:(=!.0)&,)~a=:j./_1e9+?2 50$2e9

1 -:!.(2^_42) 1+2^_43
1 -:!.(2^_43) 1+2^_44
1 -:!.(2^_44) 1+2^_45
1 -:!.(2^_45) 1+2^_46


NB. x-:"r y -------------------------------------------------------------

0 0 0 0 -: 1 2 3 -:"1 i.4 2
0 0 0 0 -: 1 2 3 -:"1 [4 3$'x'
0 0 0 0 -: 1 2 3 -:"1 [4 3$u:'x'
0 0 0 0 -: 1 2 3 -:"1 [4 3$10&u:'x'

1 0 0 0 1 -: 0 1 2 -:"1[5$i.4 3
(10$1) -: x-:"1 x=:?10 7$1e6

n=: 300
match=: 4 : 'x-:y'
test1=: 3 : '(c-:"1 d) -: c match"1 d=:((i.n)-?n$2){c=:((n,y)?@$2){''ab'''
test2=: 3 : '(c-:"1 e) -: c match"1 e=:(?n        ){c=:((n,y)?@$2){''ab'''

test1"0 i.30 10
test2"0 i.30 10

test1=: 3 : '(c-:"1 d) -: c match"1 d=:((i.n)-?n$2){c=:((n,y)?@$2){u:''ab'''
test2=: 3 : '(c-:"1 e) -: c match"1 e=:(?n        ){c=:((n,y)?@$2){u:''ab'''

test1"0 i.30 10
test2"0 i.30 10

test1=: 3 : '(c-:"1 d) -: c match"1 d=:((i.n)-?n$2){c=:((n,y)?@$2){10&u:''ab'''
test2=: 3 : '(c-:"1 e) -: c match"1 e=:(?n        ){c=:((n,y)?@$2){10&u:''ab'''

test1"0 i.30 10
test2"0 i.30 10

(-:"0/~ -: match"0/~) x=:?20$2
(-:"0/~ -: match"0/~) x=:a{~?20$#a=:'aleatoric'
(-:"0/~ -: match"0/~) x=:a{~?20$#a=:u:'aleatoric'
(-:"0/~ -: match"0/~) x=:a{~?20$#a=:10&u:'aleatoric'
(-:"0/~ -: match"0/~) x=:a{~?20$#a=:s:@<"0 'aleatoric'
(-:"0/~ -: match"0/~) x=:?20$10
(-:"0/~ -: match"0/~) x=:o.?20$10
(-:!.0"0/~ -: match0"0/~) x=:o.?20$10
(-:"0/~ -: match"0/~) x=:r.?20$10
(-:"0/~ -: match"0/~) x=:a{~?20$#a=:;:'deipno sop hist anti dis est a blish'
(-:"0/~ -: match"0/~) x=:a{~?20$#a=:(u:&.>) ;:'deipno sop hist anti dis est a blish'
(-:"0/~ -: match"0/~) x=:a{~?20$#a=:(10&u:&.>) ;:'deipno sop hist anti dis est a blish'
(-:"0/~ -: match"0/~) x=:a{~?20$#a=:s:@<"0&.> ;:'deipno sop hist anti dis est a blish'
(-:"0/~ -: match"0/~) x=:a{~?20$#a=:<"0@s: ;:'deipno sop hist anti dis est a blish'

(-:"1/~ -: match"1/~) x=:a{~?20$#a=:?10 3$2
(-:"1/~ -: match"1/~) x=:a{~?20$#a=:[;.1 ' aleatoric quitrent russia'
(-:"1/~ -: match"1/~) x=:a{~?20$#a=:[;.1 u:' aleatoric quitrent russia'
(-:"1/~ -: match"1/~) x=:a{~?20$#a=:[;.1[10&u:' aleatoric quitrent russia'
(-:"1/~ -: match"1/~) x=:a{~?20$#a=:[;.1 s:@<"0 ' aleatoric quitrent russia'
(-:"1/~ -: match"1/~) x=:a{~?20$#a=:?10 4$1e6
(-:"1/~ -: match"1/~) x=:a{~?20$#a=:o.?10 4$1000
(-:!.0"1/~ -: match0"1/~) x=:a{~?20$#a=:o.?10 4$1000
(-:"1/~ -: match"1/~) x=:a{~?20$#a=:r.?10 4$1000
(-:"1/~ -: match"1/~) x=:a{~?20$#a=:5 3$;:'deipno sop hist anti dis est a blish'
(-:"1/~ -: match"1/~) x=:a{~?20$#a=:5 3$(u:&.>) ;:'deipno sop hist anti dis est a blish'
(-:"1/~ -: match"1/~) x=:a{~?20$#a=:5 3$(10&u:&.>) ;:'deipno sop hist anti dis est a blish'
(-:"1/~ -: match"1/~) x=:a{~?20$#a=:5 3$s:@<"0&.> ;:'deipno sop hist anti dis est a blish'
(-:"1/~ -: match"1/~) x=:a{~?20$#a=:5 3$<"0@s: ;:'deipno sop hist anti dis est a blish'

(x=:a{~?20$3) (-:"0 -: match"0) y=:a{~?20$3 [ a=: ?3$2
(x=:a{~?20$3) (-:"0 -: match"0) y=:a{~?20$3 [ a=: 'xyz'
(x=:a{~?20$3) (-:"0 -: match"0) y=:a{~?20$3 [ a=: u:'xyz'
(x=:a{~?20$3) (-:"0 -: match"0) y=:a{~?20$3 [ a=: 10&u:'xyz'
(x=:a{~?20$3) (-:"0 -: match"0) y=:a{~?20$3 [ a=: s:@<"0 'xyz'
(x=:a{~?20$3) (-:"0 -: match"0) y=:a{~?20$3 [ a=: ?3$1e6
(x=:a{~?20$3) (-:"0 -: match"0) y=:a{~?20$3 [ a=: o.?3$100
(x=:a{~?20$3) (-:!.0"0 -: match0"0) y=:a{~?20$3 [ a=: o.?3$100
(x=:a{~?20$3) (-:"0 -: match"0) y=:a{~?20$3 [ a=: r.?3$100
(x=:a{~?20$3) (-:"0 -: match"0) y=:a{~?20$3 [ a=: ;:'ja oder nein'
(x=:a{~?20$3) (-:"0 -: match"0) y=:a{~?20$3 [ a=: (u:&.>) ;:'ja oder nein'
(x=:a{~?20$3) (-:"0 -: match"0) y=:a{~?20$3 [ a=: (10&u:&.>) ;:'ja oder nein'
(x=:a{~?20$3) (-:"0 -: match"0) y=:a{~?20$3 [ a=: s:@<"0&.> ;:'ja oder nein'
(x=:a{~?20$3) (-:"0 -: match"0) y=:a{~?20$3 [ a=: <"0@s: ;:'ja oder nein'

(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: ?3 5$2
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: 3 7$'ipso facto Cogito, ergo sum.'
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: 3 7$u:'ipso facto Cogito, ergo sum.'
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: 3 7$10&u:'ipso facto Cogito, ergo sum.'
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: 3 7$s:@<"0 'ipso facto Cogito, ergo sum.'
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: ?3 4$3
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: o.?3 5$3
(x=:a{~?20$3) (-:!.0"1 -: match0"1) y=:a{~?20$3 [ a=: o.?3 5$3
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: r.?3 5$3
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: (<'do'),.3 5$;:'pi no so hi do to an am no'
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: (<u:'do'),.3 5$(u:&.>) ;:'pi no so hi do to an am no'
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: (<10&u:'do'),.3 5$(10&u:&.>) ;:'pi no so hi do to an am no'
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: (s:@<"0&.> <'do'),.3 5$s:@<"0&.> ;:'pi no so hi do to an am no'
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: (s:@<"0&.> <'do'),.3 5$<"0@s: ;:'pi no so hi do to an am no'
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: (<"0@s: <'do'),.3 5$s:@<"0&.> ;:'pi no so hi do to an am no'
(x=:a{~?20$3) (-:"1 -: match"1) y=:a{~?20$3 [ a=: (<"0@s: <'do'),.3 5$<"0@s: ;:'pi no so hi do to an am no'

test3=: 4 : 0
 a=. x{~?(3,y)$#x
 xx=:a{~?#a
 yy=:a{~?3 5$#a
 assert. xx (-:"1 -: match"1) yy
 assert. yy (-:"1 -: match"1) xx
 assert. xx (-:!.0"1 -: match0"1) yy
 assert. yy (-:!.0"1 -: match0"1) xx
 1
)

0 1         test3"1 0 i.3 10
'abc'       test3"1 0 i.3 10
0 1 2       test3"1 0 i.3 10
0 1 2.3     test3"1 0 i.3 10
0 1 2j3     test3"1 0 i.3 10
(0 1;2;i.7) test3"1 0 i.3 10

test4=: 4 : 0
 a=. x{~?(3,y)$#x
 xx=:a{~?3 5 2 7$#a
 yy=:a{~?3 5$#a
 assert. xx (-:"1 -: match"1) yy
 assert. yy (-:"1 -: match"1) xx
 assert. xx (-:!.0"1 -: match0"1) yy
 assert. yy (-:!.0"1 -: match0"1) xx
 1
)

0 1         test4"1 0 i.3 10
'abc'       test4"1 0 i.3 10
0 1 2       test4"1 0 i.3 10
0 1 2.3     test4"1 0 i.3 10
0 1 2j3     test4"1 0 i.3 10
(0 1;2;i.7) test4"1 0 i.3 10


randfini''


epilog''

